package com.itheima.bean;

import java.util.Arrays;
import java.util.StringJoiner;

public class student1 {
    private String username;
    private int age;
    private String[] hobbies;

    public student1(String username, int age, String[] hobbies) {
        this.username = username;
        this.age = age;
        this.hobbies = hobbies;
    }

    public student1() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String[] getHobbies() {
        return hobbies;
    }

    public void setHobbies(String[] hobbies) {
        this.hobbies = hobbies;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", student1.class.getSimpleName() + "[", "]")
                .add("username='" + username + "'")
                .add("age=" + age)
                .add("hobbies=" + Arrays.toString(hobbies))
                .toString();
    }
}
